#ifndef CANMESSAGE_H
#define CANMESSAGE_H
#include <QString>
#include <QVector>

class CanMessage
{
public:
    CanMessage(QString USBCanString);
    CanMessage(quint32 identifier, QVector<quint8> data);

    quint32 GetIdentifier();
    QVector<quint8> GetData() const;
    int GetDataLength();
    bool IsValid();

    QString GetAsSnifferSendString();
    unsigned int GetPGN();
    unsigned int GetSA();
private:
    void ParseFromUSBCanString(QString USBString);
    void ParseExtendedMessage(QString USBString);


    quint32 Identifier;
    QVector<quint8> Data;
    bool Valid;
};

#endif // CANMESSAGE_H
